package com.jeeplus.test.jlnu.timeConfigManage.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.test.jlnu.timeConfigManage.domain.TimeConfig;
import com.jeeplus.test.jlnu.timeConfigManage.mapper.TimeConfigMapper;
import com.jeeplus.test.jlnu.timeConfigManage.service.TimeConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.Date;
import java.util.List;

@Service
public class TimeConfigServiceImpl implements TimeConfigService {


    @Autowired
    private TimeConfigMapper timeConfigMapper;





    @Override
    public String getPrincipalByDate(Date date) {
        return timeConfigMapper.findPrincipalByDate(date);
    }

    @Override
    public int saveOrUpdate(TimeConfig timeConfig) {
       return timeConfigMapper.saveOrUpdate(timeConfig);
    }

    @Override
    public List<TimeConfig> listByDate(Date date) {
        return Collections.emptyList();
    }

    @Override
    public Page<TimeConfig> getTimeConfigPage(TimeConfig timeConfig, Page<TimeConfig> page) {
        Page<TimeConfig> graduationInfoPage = timeConfigMapper.getTimeConfigPage(timeConfig, page);
        return graduationInfoPage;
    }

    @Override
    public boolean deleteById(Integer id) {
        return timeConfigMapper.deleteById(id);
    }
}
